package cn.zdsoft.configuration.entity;

import java.io.Serializable;

/**
 * Created by wangdongdong on 2018/5/29 11:40.
 */
public class JsonData implements Serializable {

    private boolean success;

    private String msg;

    public static JsonData success(String msg) {
        return new JsonData().setMsg(msg).setSuccess(true);
    }

    public static JsonData fail(String msg) {
        return new JsonData().setMsg(msg).setSuccess(false);
    }

    public boolean isSuccess() {
        return success;
    }

    public JsonData setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public JsonData setMsg(String msg) {
        this.msg = msg;
        return this;
    }
}
